package worst.shopping.lists;

import worst.shopping.adapter.AHighlightableImageCursorAdapter;
import database.ListDAO;

import android.content.Context;
import android.database.Cursor;
import android.graphics.drawable.Drawable;


public class CreateListHighlightableImageCursorAdapter extends AHighlightableImageCursorAdapter {

	private ListDAO _listDAO;
	
	public CreateListHighlightableImageCursorAdapter(Context context, int layout,
			Cursor cursor, String[] from, int[] to, Drawable highlight, ListDAO listDAO, String listname) {
		super(context, layout, cursor, from, to, highlight, listname);

		_listDAO = listDAO;
	}

	@Override
	protected boolean isSelected(String listname, String productname, int cursorPosition) {
		return _listDAO.isInTemporaryTable(productname);
	}
}
